//
//  ZxFmLiveHeaderViewModel.m
//  XiMaFM
//
//  Created by fanzhuxian on 2017/9/4.
//  Copyright © 2017年 hcios. All rights reserved.
//

#import "ZxFmLiveHeaderViewModel.h"

#import "ZxFmLiveHeaderModel.h"
#import "ZxHomePageNetManager.h"

@implementation ZxFmLiveHeaderViewModel

- (void)getDataCompletionHandle:(void (^)(NSError *))completed {

    self.dataTask = [ZxHomePageNetManager getLivePageCompletionHandle:^(ZxFmLiveHeaderModel * responseObject, NSError *error) {
        
        self.model = responseObject;
        
        completed(error);
    }];
}

#pragma mark - 头部滚动视图
/** 滚动展示栏的图片数量 */
- (NSInteger)focusImgNumber {
    return self.model.list.count;
    
}
/** 滚动展示栏的图片地址 */
- (NSURL *)focusImgURLForIndex:(NSInteger)index {
    NSString *path = self.model.list[index].pic;
    return [NSURL URLWithString:path];
    
}

@end
